﻿using System;
using System.Linq.Expressions;

namespace Tszy.Unlimited.Data.AdoNet.Sql.Components.Expressions.Values
{
    /// <summary>
    ///
    /// </summary>
    public class ValueExpressionResult
    {
        /// <summary>
        /// 操作状态。
        /// </summary>
        public bool Status { get; set; }

        /// <summary>
        /// 类型。
        /// </summary>
        public ValueExpressionType Type { get; set; }

        /// <summary>
        /// 属性类型。
        /// </summary>
        public Type PropertyType { get; set; }

        /// <summary>
        /// 结果值。
        /// </summary>
        public object Value { get; set; }

        /// <summary>
        /// 当前条件表达式。
        /// </summary>
        public Expression Expression { get; set; }
    }

    /// <summary>
    ///
    /// </summary>
    public enum ValueExpressionType
    {
        /// <summary>
        ///
        /// </summary>
        None = 0,

        /// <summary>
        ///
        /// </summary>
        Parameter = 1,

        /// <summary>
        ///
        /// </summary>
        Value = 2
    }
}